package com.situ.day7;

import java.security.AlgorithmParameterGenerator;

public class Stu {
	//实例变量。必须new出对象，然后(对象.)的方式访问
	private String name;
	private int age;
	//static静态变量，所有势力都共享这个变量
	public static String country = "CN";// "CN"
	
	//静态方法
	public static void show() {
		country = "US";
		//Cannot make a static reference to the non-static field age
		age = 20;//访问实例变量的前提是必须new出一个实例才访问
	}
	
	//实例方法，必须new出对象，然后(对象.)的方式访问
	public void print() {
		country = "AA";
		age = 34;
	}
	

	public Stu() {
		super();
	}

	public Stu(String name, int age, String country) {
		super();
		this.name = name;
		this.age = age;
		this.country = country;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

}
